def triangles():
    lst = [1]

    while True:
        yield lst
        lst2 = [0] + lst + [0]
        lst = [lst2[i] + lst2[i+1] for i in range(len(lst2)-1)]


list = []
n = 0

for item in triangles():
    list.append(item)
    n = n + 1
    if n == 10: break

for item in list:
    print(item)